import request from '@/utils/request'

// 查询视图列表
export function listView(query) {
  return request({
    url: '/rva/view/list',
    method: 'get',
    params: query
  })
}

// 查询视图详细
export function getView(id) {
  return request({
    url: '/rva/view/' + id,
    method: 'get'
  })
}

// 新增视图
export function addView(data) {
  return request({
    url: '/rva/view',
    method: 'post',
    data: data
  })
}

// 修改视图
export function updateView(data) {
  return request({
    url: '/rva/view',
    method: 'put',
    data: data
  })
}

// 删除视图
export function delView(id) {
  return request({
    url: '/rva/view/' + id,
    method: 'delete'
  })
}

// 导出视图
export function exportView(query) {
  return request({
    url: '/rva/view/export',
    method: 'get',
    params: query
  })
}